package com.lmk.controller;

import com.lmk.bean.Employee;
import com.lmk.service.EmployeeService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author 李民康
 * @date 2020/7/26 11:41
 * 处理员工crud请求
 */
@Controller
public class EmployeeController {

    EmployeeService employeeService;


    /**
     * 查询员工数据(分页查询)
     * @return
     */
    @RequestMapping("/emps")
    public String getEmps() {
        //查询所有员工信息，不是分页查询
        List<Employee> employees=employeeService.getAll();
        return "list";
    }
}
